Eclipse Platform
Pre-release 3.0

org.eclipse.swt.custom
Class CTabFolder2

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended byorg.eclipse.swt.custom.CTabFolder2
All Implemented Interfaces:
Drawable

public class CTabFolder2
extends Composite

Instances of this class implement the notebook user interface metaphor. It allows the user to select a notebook page from set of pages.

The item children that may be added to instances of this class must be of type CTabItem. Control children are created and then set into a tab item using CTabItem#setControl.

Note that although this class is a subclass of Composite, it does not make sense to set a layout on it.

Styles:
TOP, BOTTOM, FLAT
Events:
Selection
"CTabFolder"

Note: Only one of the styles TOP and BOTTOM may be specified.

IMPORTANT: This class is not intended to be subclassed.


Field Summary
static RGB borderInsideRGB
          Deprecated.  
static RGB borderMiddleRGB
          Deprecated.  
static RGB borderOutsideRGB
          Deprecated.  
 int marginHeight
          marginHeight specifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the form.
 int marginWidth
          marginWidth specifies the number of pixels of horizontal margin that will be placed along the left and right edges of the form.
 int MIN_TAB_WIDTH
          A multiple of the tab height that specifies the minimum width to which a tab will be compressed before scrolling arrows are used to navigate the tabs.
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
CTabFolder2(Composite parent, int style)
          Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
 
Method Summary
 void addCTabFolderCloseListener(CTabFolderCloseListener listener)
          Adds the listener to the collection of listeners who will be notified when a tab item is closed.
 void addCTabFolderExpandListener(CTabFolderExpandListener listener)
           
 void addCTabFolderListener(CTabFolderListener listener)
          Deprecated. use addCTabFolderCloseListener
 void addCTabFolderListListener(CTabFolderListListener listener)
          Adds the listener to the collection of listeners who will be notified when a the selection list is displayed.
 void addSelectionListener(SelectionListener listener)
          Adds the listener to receive events.
 Point computeSize(int wHint, int hHint, boolean changed)
          Returns the preferred size of the receiver.
 Rectangle computeTrim(int x, int y, int width, int height)
          Given a desired client area for the receiver (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.
 Rectangle getClientArea()
          Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").
 boolean getExpanded()
          Returns true if the receiver is expanded, and false otherwise.
 CTabItem2 getItem(int index)
          Return the tab that is located at the specified index.
 CTabItem2 getItem(Point pt)
          Gets the item at a point in the widget.
 int getItemCount()
          Return the number of tabs in the folder.
 CTabItem2[] getItems()
          Return the tab items.
 CTabItem2 getSelection()
          Return the selected tab item, or an empty array if there is no selection.
 int getSelectionIndex()
          Return the index of the selected tab item, or -1 if there is no selection.
 int getTabHeight()
          Returns the height of the tab
 Control getTopRight()
          Deprecated.  
 int indexOf(CTabItem2 item)
          Return the index of the specified tab or -1 if the tab is not in the receiver.
 void removeCTabFolderCloseListener(CTabFolderCloseListener listener)
           
 void removeCTabFolderExpandListener(CTabFolderExpandListener listener)
           
 void removeCTabFolderListener(CTabFolderListener listener)
          Deprecated. see removeCTabFolderCloseListener(CTabFolderListener)
 void removeCTabFolderListListener(CTabFolderListListener listener)
           
 void removeSelectionListener(SelectionListener listener)
          Removes the listener.
 void setBackground(Color color)
          Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.
 void setBorderColor(Color color)
          Deprecated.  
 void setBorderVisible(boolean show)
          Toggle the visibility of the border
 void setExpanded(boolean expanded)
          Sets the expanded state of the receiver.
 void setFont(Font font)
          Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.
 void setForeground(Color color)
          Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.
 void setInsertMark(CTabItem2 item, boolean after)
          Display an insert marker before or after the specified tab item.
 void setInsertMark(int index, boolean after)
          Display an insert marker before or after the specified tab item.
 void setSelection(CTabItem2 item)
          Set the selection to the tab at the specified item.
 void setSelection(int index)
          Set the selection to the tab at the specified index.
 void setSelectionBackground(Color color)
           
 void setSelectionBackground(Color[] colors, int[] percents)
          Specify a gradient of colours to be draw in the background of the selected tab.
 void setSelectionBackground(Image image)
          Set the image to be drawn in the background of the selected tab.
 void setSelectionForeground(Color color)
          Set the foreground color of the selected tab.
 void setTabHeight(int height)
          Specify a fixed height for the tab items.
 void setTopRight(Control control)
          Deprecated.  
 void showItem(CTabItem2 item)
          Shows the item.
 void showSelection()
          Shows the selection.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBounds, setBounds, setCapture, setCursor, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

marginWidth

public int marginWidth
marginWidth specifies the number of pixels of horizontal margin that will be placed along the left and right edges of the form. The default value is 0.


marginHeight

public int marginHeight
marginHeight specifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the form. The default value is 0.


MIN_TAB_WIDTH

public int MIN_TAB_WIDTH
A multiple of the tab height that specifies the minimum width to which a tab will be compressed before scrolling arrows are used to navigate the tabs. NOTE This field is badly named for historical reasons. It is not static.


borderInsideRGB

public static RGB borderInsideRGB
Deprecated.  

Color of innermost line of drop shadow border.


borderMiddleRGB

public static RGB borderMiddleRGB
Deprecated.  

Color of middle line of drop shadow border.


borderOutsideRGB

public static RGB borderOutsideRGB
Deprecated.  

Color of outermost line of drop shadow border.

Constructor Detail

CTabFolder2

public CTabFolder2(Composite parent,
                   int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.

Parameters:
parent - a widget which will be the parent of the new instance (cannot be null)
style - the style of widget to construct
Throws:
IllegalArgumentException -
SWTException -
See Also:
SWT.TOP, SWT.BOTTOM, SWT.FLAT, SWT.BORDER, SWT.SINGLE, SWT.MULTI, Widget.getStyle()
Method Detail

addCTabFolderCloseListener

public void addCTabFolderCloseListener(CTabFolderCloseListener listener)
Adds the listener to the collection of listeners who will be notified when a tab item is closed.

Parameters:
listener - the listener which should be notified
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed
Since:
3.0
See Also:
CTabFolderCloseListener, removeCTabFolderCloseListener(CTabFolderCloseListener)

addCTabFolderExpandListener

public void addCTabFolderExpandListener(CTabFolderExpandListener listener)
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed
Since:
3.0

addCTabFolderListener

public void addCTabFolderListener(CTabFolderListener listener)
Deprecated. use addCTabFolderCloseListener

Adds the listener to the collection of listeners who will be notified when a tab item is closed.

Parameters:
listener - the listener which should be notified
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed
See Also:
CTabFolderListener, removeCTabFolderListener(CTabFolderListener)

addCTabFolderListListener

public void addCTabFolderListListener(CTabFolderListListener listener)
Adds the listener to the collection of listeners who will be notified when a the selection list is displayed.

Parameters:
listener - the listener which should be notified
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed
Since:
3.0
See Also:
CTabFolderListListener, removeCTabFolderListListener(CTabFolderListListener)

addSelectionListener

public void addSelectionListener(SelectionListener listener)
Adds the listener to receive events.

Parameters:
listener - the listener
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

computeSize

public Point computeSize(int wHint,
                         int hHint,
                         boolean changed)
Description copied from class: Control
Returns the preferred size of the receiver.

The preferred size of a control is the size that it would best be displayed at. The width hint and height hint arguments allow the caller to ask a control questions such as "Given a particular width, how high does the control need to be to show all of the contents?" To indicate that the caller does not wish to constrain a particular dimension, the constant SWT.DEFAULT is passed for the hint.

If the changed flag is true, it indicates that the receiver's contents have changed, therefore any caches that a layout manager containing the control may have been keeping need to be flushed. When the control is resized, the changed flag will be false, so layout manager caches can be retained.

Overrides:
computeSize in class Composite

computeTrim

public Rectangle computeTrim(int x,
                             int y,
                             int width,
                             int height)
Description copied from class: Scrollable
Given a desired client area for the receiver (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.

In other words, it returns a rectangle such that, if the receiver's bounds were set to that rectangle, the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings") would be the rectangle described by the arguments (relative to the receiver's parent).

Overrides:
computeTrim in class Scrollable
Returns:
the required bounds to produce the given client area
See Also:
Scrollable.getClientArea()

getClientArea

public Rectangle getClientArea()
Description copied from class: Scrollable
Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").

Overrides:
getClientArea in class Scrollable
Returns:
the client area
See Also:
Scrollable.computeTrim(int, int, int, int)

getExpanded

public boolean getExpanded()
Returns true if the receiver is expanded, and false otherwise.

Returns:
the expanded state
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since:
3.0

getItem

public CTabItem2 getItem(int index)
Return the tab that is located at the specified index.

Parameters:
index - the index of the tab item
Returns:
the item at the specified index
Throws:
IllegalArgumentException -
  • ERROR_INVALID_RANGE - if the index is out of range
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

getItem

public CTabItem2 getItem(Point pt)
Gets the item at a point in the widget.

Parameters:
pt - the point in coordinates relative to the CTabFolder
Returns:
the item at a point or null
Throws:
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

getItemCount

public int getItemCount()
Return the number of tabs in the folder.

Returns:
the number of tabs in the folder
Throws:
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

getItems

public CTabItem2[] getItems()
Return the tab items.

Returns:
the tab items
Throws:
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

getSelection

public CTabItem2 getSelection()
Return the selected tab item, or an empty array if there is no selection.

Returns:
the selected tab item
Throws:
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

getSelectionIndex

public int getSelectionIndex()
Return the index of the selected tab item, or -1 if there is no selection.

Returns:
the index of the selected tab item or -1
Throws:
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

getTabHeight

public int getTabHeight()
Returns the height of the tab

Returns:
the height of the tab
Throws:
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

getTopRight

public Control getTopRight()
Deprecated.  

Returns the control in the top right corner of the tab folder. Typically this is a close button or a composite with a menu and close button.

Returns:
the control in the top right corner of the tab folder or null
Throws:
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed
Since:
2.1

indexOf

public int indexOf(CTabItem2 item)
Return the index of the specified tab or -1 if the tab is not in the receiver.

Parameters:
item - the tab item for which the index is required
Returns:
the index of the specified tab item or -1
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

removeCTabFolderCloseListener

public void removeCTabFolderCloseListener(CTabFolderCloseListener listener)
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed
Since:
3.0

removeCTabFolderExpandListener

public void removeCTabFolderExpandListener(CTabFolderExpandListener listener)
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed
Since:
3.0

removeCTabFolderListener

public void removeCTabFolderListener(CTabFolderListener listener)
Deprecated. see removeCTabFolderCloseListener(CTabFolderListener)

Removes the listener.

Parameters:
listener - the listener
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

removeCTabFolderListListener

public void removeCTabFolderListListener(CTabFolderListListener listener)
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed
Since:
3.0

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)
Removes the listener.

Parameters:
listener - the listener
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

setBackground

public void setBackground(Color color)
Description copied from class: Control
Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.

Overrides:
setBackground in class Control
Parameters:
color - the new color (or null)

setBorderColor

public void setBorderColor(Color color)
Deprecated.  

Since:
3.0

setBorderVisible

public void setBorderVisible(boolean show)
Toggle the visibility of the border

Parameters:
show - true if the border should be displayed
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

setExpanded

public void setExpanded(boolean expanded)
Sets the expanded state of the receiver.

Parameters:
expanded - the new expanded state
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

setFont

public void setFont(Font font)
Description copied from class: Control
Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.

Overrides:
setFont in class Control
Parameters:
font - the new font (or null)

setForeground

public void setForeground(Color color)
Description copied from class: Control
Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.

Overrides:
setForeground in class Control
Parameters:
color - the new color (or null)

setInsertMark

public void setInsertMark(CTabItem2 item,
                          boolean after)
Display an insert marker before or after the specified tab item. A value of null will clear the mark.

Parameters:
item - the item with which the mark is associated or null
after - true if the mark should be displayed after the specified item
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

setInsertMark

public void setInsertMark(int index,
                          boolean after)
Display an insert marker before or after the specified tab item. A value of -1 will clear the mark.

Parameters:
index - the index of the item with which the mark is associated or null
after - true if the mark should be displayed after the specified item
Throws:
IllegalArgumentException
    -
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

setSelection

public void setSelection(CTabItem2 item)
Set the selection to the tab at the specified item.

Parameters:
item - the tab item to be selected
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

setSelection

public void setSelection(int index)
Set the selection to the tab at the specified index.

Parameters:
index - the index of the tab item to be selected
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

setSelectionBackground

public void setSelectionBackground(Color color)
Since:
3.0

setSelectionBackground

public void setSelectionBackground(Color[] colors,
                                   int[] percents)
Specify a gradient of colours to be draw in the background of the selected tab. For example to draw a gradient that varies from dark blue to blue and then to white, use the following call to setBackground:
	cfolder.setBackground(new Color[]{display.getSystemColor(SWT.COLOR_DARK_BLUE), 
		                           display.getSystemColor(SWT.COLOR_BLUE),
		                           display.getSystemColor(SWT.COLOR_WHITE), 
		                           display.getSystemColor(SWT.COLOR_WHITE)},
		               new int[] {25, 50, 100});
 

Parameters:
colors - an array of Color that specifies the colors to appear in the gradient in order of appearance left to right. The value null clears the background gradient. The value null can be used inside the array of Color to specify the background color.
percents - an array of integers between 0 and 100 specifying the percent of the width of the widget at which the color should change. The size of the percents array must be one less than the size of the colors array.
Throws:
SWTError -
  • ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  • ERROR_WIDGET_DISPOSED when the widget has been disposed

setSelectionBackground

public void setSelectionBackground(Image image)
Set the image to be drawn in the background of the selected tab.

Parameters:
image - the image to be drawn in the background
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

setSelectionForeground

public void setSelectionForeground(Color color)
Set the foreground color of the selected tab.

Parameters:
color - the color of the text displayed in the selected tab
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

setTabHeight

public void setTabHeight(int height)
Specify a fixed height for the tab items. If no height is specified, the default height is the height of the text or the image, whichever is greater. Specifying a height of 0 will revert to the default height.

Parameters:
height - the pixel value of the height or 0
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
  • ERROR_INVALID_ARGUMENT - if called with a height of less than 0

setTopRight

public void setTopRight(Control control)
Deprecated.  

Set the control that appears in the top right corner of the tab folder. Typically this is a close button or a composite with a Menu and close button. The topRight control is optional. Setting the top right control to null will remove it from the tab folder.

Parameters:
control - the control to be displayed in the top right corner or null
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
  • ERROR_INVALID_ARGUMENT - if the control is not a child of this CTabFolder
Since:
2.1

showItem

public void showItem(CTabItem2 item)
Shows the item. If the item is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled until the item is visible.

Parameters:
item - the item to be shown
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the item is null
  • ERROR_INVALID_ARGUMENT - if the item has been disposed
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since:
2.0
See Also:
CTabFolder.showSelection()

showSelection

public void showSelection()
Shows the selection. If the selection is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled until the selection is visible.

Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since:
2.0
See Also:
CTabFolder.showItem(CTabItem)

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.